package classes.rocks {
	import flash.display.MovieClip;
	import flash.events.*;
	
	import com.mttang.event.CommonEvent;
	import com.mttang.event.JEvent;

	/**
	 * ...
	 * @author fox
	 */
	public class BtnBar extends MovieClip {

		public function BtnBar(){
			addEventListener(MouseEvent.CLICK, btnbarClickHandler);
		}

		private function btnbarClickHandler(e:MouseEvent):void {
			//trace(e.target.name);
			var tmpStr:String = (e.target.name).split("btn_")[1];
			var _obj:Object = new Object();
			_obj.type = tmpStr;
			dispatchEvent(new JEvent("btnBarEvent",_obj));
		}

		public function show():void {
			this.visible = true;
		}

		public function hide():void {
			this.visible = false;
		}

	}

}